# Prototype
snippet proto
	${1:class_name}.prototype.${2:method_name} =
	function(${3:first_argument}) {
		${4:// body...}
	};//$1()
# Function
snippet fun
	function ${1:function_name} (${2:argument}) {
		${3:console.log( "$1()" );}
	}//$1()
# Anonymous Function
snippet af
	function(${1:args}) {${2}}${3}
# Named Anonymous Function
snippet naf
	 function ${1:funcname}(${2:args}) {${3}}${4}
# Named inline function
snippet nf
	var ${1:fname} function(${2:args}) {${3}}${4}
# Var function 
snippet vf
	var ${1:func_name} = function(${2:args}) {
		${3:console.log( '$1()' );}
	};//$1()
# if
snippet if If, standard multiline style 
	if ( ${1:true} ) {
		${2}
	}${3}
snippet ifo If on one line
	if (${1:true}) {${2}};
snippet el 
	else {
		${1}
	}
# if ... else
snippet ife If else with braces #1
	if ( ${1:true} ) {
		${2}
	} else{
		${3}
	}
snippet ife If else on one line #2
	if (${1:true}) {${2}}
	else{${3}};
# tertiary conditional
snippet t
	${1:/* condition */} ? ${2:a} : ${3:b}
# switch
snippet switch
	switch(${1:expression}) {
		case '${3:case}':
			${4:// code}
			break;
		${5}
		default:
			${2:// code}
	}
# case
snippet case
	case '${1:case}':
		${2:// code}
		break;
	${3}
# for (...) {...}
snippet for
	for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:+=1}) {
		${4:$1[$2]}
	}
# for (...) {...} (Improved Native For-Loop)
snippet forr
	for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) {
		${4:$1[$2]}
	}
# for (var name in obj) {...}
snippet fori
	for (var ${1:name} in ${2:obj}) { if ( $2.hasOwnProperty( $1 ) ) {
			${3:$2[$1]}
	}}//rof
# while (...) {...}
snippet wh
	while (${1:/* condition */}) {
		${2:/* code */}
	}
# do...while
snippet do
	do {
		${2:/* code */}
	} while (${1:/* condition */});
# Object Method
snippet :f
	${1:method_name}: function(${2:args}) {
		${4:console.log( "$1()" );}
	}${3}
# setTimeout function
snippet timeout
	setTimeout(function() {${3}}${2}, ${1:10};
# Get Elements
snippet get
	getElementsBy${1:TagName}('${2}')${3}
# Get Element
snippet gett
	getElementBy${1:Id}('${2}')${3}
snippet jeach 
	.each( function( iter ){
			${1}
		});
snippet v
	var ${1} = ${2};
snippet ({ 
	({${1}})
snippet cl 
	console.log(${1});
###############
# JQuery helpers
snippet $attr
	.attr( ${1:,}${2:} )${3}
snippet $rattr
	.removeAttr( ${1} )${2}
snippet $val 
	.val(${1})${2}
snippet $click
	.click( function( ${1:ev} ) {${2}})
snippet $each
	.each( function( ${1:iter} ) {${2}})
snippet $change
	.change( function( ${1:ev} ) {${2}})
snippet al
	alert( ${1} );
snippet di #Object item snippet
	${1:name}:${2}${3:,}${4}
snippet meth
	var ${1:method_name} = function( ${2:method_args} ) {
		${3:console.log( '$1()' );}
		${4://code}
	};//$1()
	pubIface.$1 = $1;
